import { createRouter, createWebHistory } from 'vue-router'
import FormDesigner from '@/views/DormDesigner.vue'
import FormPreview from '@/views/FormPreview.vue'
import formViewer from '@/views/formViewer.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/design',
      name: 'design',
      component: FormDesigner
    },
    {
      path: '/preview',
      name: 'preview',
      component: FormPreview
    },
    {
      path: '/formViewer',
      name: 'formViewer',
      component: formViewer
    },
    {
      path: '/',
      redirect: '/design'
    }
  ]
})

export default router